package com.ithaima.genericityinterface;

import java.util.ArrayList;

public class GenericityInterface {
    public static void main(String[] args) {
        GenericityImpl1<String> genericityImpl1= new GenericityImpl1();
        genericityImpl1.metnod("123");

        GenericityImpl2 genericityImpl2 = new GenericityImpl2();
        genericityImpl2.metnod(12);
    }

}

interface Genericity<E>{
    public  abstract void metnod(E e);
}
class GenericityImpl2<Integer> implements Genericity<Integer>{


    @Override
    public void metnod(Integer integer) {
        System.out.println(integer);
    }
}

class GenericityImpl1 <E> implements Genericity<E>{
    @Override
    public void metnod(E e) {
        System.out.println(e);
    }
}